grep Source seehad* | wc

if [ ! -e listofsubmerge.list ]
then
    find AnaOut_all_su* > listofsubmerge.list
fi

wc listofsubmerge.list

read aa

echo $aa

root -b -l <<EOF
#include "../NeutrinoTools.h"
ch=NeutrinoTools::InputFiles("listofsubmerge.list","default")
ch->Merge("defaultTree.root")
EOF

root -b -l <<EOF
#include "../NeutrinoTools.h"
ch=NeutrinoTools::InputFiles("listofsubmerge.list","truth")
ch->Merge("truthTree.root")
EOF

root -b -l <<EOF
#include "../NeutrinoTools.h"
ch=NeutrinoTools::InputFiles("listofsubmerge.list","header")
ch->Merge("headerTree.root")
EOF

hadd allTree.root {default,truth,header}Tree.root

echo done
